﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace winproject.Models
{
    public class ReturnResult
    {
        public string msgJson { get; set; }
        public int errCode { get; set; }
    }

    public class GlobalViewModel
    {
        public string ApplicationName { get; set; }
        public string ApplicationPath { get; set; }
        public string jsonServerString { get; set; }
        public ReturnResult oReturnResult { get; set; }
        public static string HtmlEncode(string value)
        {
            return value.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;").Replace("\"", "&quot;").Replace("'", "&apos;");
        }

        public static string HtmlDecode(string value)
        {
            return value.Replace("&amp;", "&").Replace("&lt;", "<").Replace("&gt;", ">").Replace("&quot;", "\"").Replace("&apos;", "'");
        }
    }
}